import {httpRequest} from "../request";

module.exports = {

  login: (params) => {
    return httpRequest({
        'url': '/auth/login',
        'method': 'post',
        'params': params
    });
  },
  
  logout: (params) => {
    return httpRequest({
        'url': '/auth/logout',
        'method': 'get',
        'params': params
    });
  },

  validateToken: (params) => {
    return httpRequest({
        'url': '/auth/validateToken',
        'method': 'post',
        'params': params,
        'header': {
          'Content-Type': 'application/x-www-form-urlencoded' 
        }
    });
  },

  tokenRenewal: (params) => {
    return httpRequest({
        'url': '/auth/tokenRenewal',
        'method': 'post',
        'params': params
    });
  }

}; 